package com.briup.srms.sms.service.impl;

import com.briup.srms.sms.bean.extend.StudentExtend;
import com.briup.srms.sms.dao.extend.StudentExtendMapper;
import com.briup.srms.sms.service.IStudentPrimaryService;
import com.jacky.base.utils.PageVM;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: sms
 * @description: 学生非隐私数据接口实现
 * @author: charles
 * @create: 2022-02-22 10:11
 **/
@Service
public class StudentPrimaryServiceImpl implements IStudentPrimaryService {

    @Autowired
    private StudentExtendMapper studentExtendMapper;

    @Override
    public PageVM<StudentExtend> pageQuery(int page, int pageSize, String realname, Long clazzId, String status, Long[] channelIds, String[] stuTypes, String year) {
        List<StudentExtend> list = studentExtendMapper.queryPrimary(page, pageSize,realname,clazzId,status,channelIds,stuTypes,year);
        Long total = studentExtendMapper.count(realname,clazzId,status,channelIds,stuTypes,year);
        return new PageVM<>(page,pageSize,total,list);
    }
}
